
package com.trydofor.id.exec;

import com.trydofor.id.doer.shell.ArgHelp;
import com.trydofor.id.doer.shell.Command;

/**
 * @author : Shi Rongjiu (www.trydofor.com)
 */
public final class Int64Cmd {
    
    private Int64Cmd() {
    }
    
    /**
     * register an a9maker
     * 
     * @return the a9maker
     */
    public static Command registerMaker() {
        Command cmd = new Command("register", "register the a9maker");
        
        ArgHelp argName = new ArgHelp("name");
        argName.setManual("the maker's name");
        argName.setRequired(true);
        cmd.addArgument(argName);
        
        ArgHelp argMaker = new ArgHelp("maker");
        argMaker.setManual("the maker instance name");
        argMaker.setRequired(true);
        cmd.addArgument(argMaker);
        
        return cmd;
    }
    
    /**
     * unregister a command
     * 
     * @return the command
     */
    public static Command unregisterMaker() {
        Command cmd = new Command("unregister", "unregister the a9maker");
        
        ArgHelp argName = new ArgHelp("name");
        argName.setManual("the maker's name");
        argName.setRequired(true);
        cmd.addArgument(argName);
        
        return cmd;
    }
    
    /**
     * query some long
     * 
     * @return the command
     */
    public static Command query() {
        Command cmd = new Command("query", "query some int64");
        
        ArgHelp argName = new ArgHelp("maker");
        argName.setManual("the maker's name");
        argName.setRequired(true);
        cmd.addArgument(argName);
        
        ArgHelp limit = new ArgHelp("count");
        limit.setManual("the count to query");
        limit.setRequired(true);
        limit.setPattern("^\\d+$");
        cmd.addArgument(limit);
        
        ArgHelp code = new ArgHelp("authcode");
        limit.setManual("the authcode of query");
        limit.setRequired(true);
        limit.setPattern("^\\d+$");
        cmd.addArgument(code);
        
        return cmd;
    }
    
    /**
     * list the maker
     * 
     * @return the command
     */
    public static Command listMaker() {
        return new Command("listMaker", "list the maker");
    }
}
